package org.example.domain.response;

/**
 * 常用结果的枚举
 */
public enum ResponseResultEnum {
    SUCCESS("200", "接口调用成功"),
    VALIDATE_FAILED("202", "参数校验失败"),
    COMMON_FAILED("203", "接口调用失败"),
    BAD_REQUEST("400","请求的地址不存在或包含不支持的参数"),
    AUTH_ERROR("401","用户名或密码错误!请重新登录") ,
    FORBIDDEN("403", "权限不足"),
    NOT_FOUND("404","请求的资源不存在"),
    INTER_SERVER_ERROR("500","内部错误");

    private String msg;
    private String code;

    ResponseResultEnum(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public String getCode()  {
        return code;
    }
}
